{% extends "User_panel/base_user_panel.html" %}
{% block panel-content %}
    <div id="center">
        <div class="order-title"><font>&nbsp&nbsp&nbsp&nbsp;Consignee Name</font></div>
        <div style="padding-left: 30px; font-size: 20px;">{{my_address.name}}</div>
        <hr>
        <div class="order-title"><font>&nbsp&nbsp&nbsp&nbsp;Delivery Address</font></div>
        <div style="padding-left: 30px; font-size: 20px">
            {{my_address.address}},&nbsp;{{my_address.postnumber}},&nbsp;{{my_address.city}},&nbsp;
            {% if my_address.state %}
                {{my_address.state}}
            {% endif %}
            {{my_address.country}}
        </div>
        <hr>
        <div class="order-title"><font>&nbsp&nbsp&nbsp&nbsp;Phone Number</font></div>
        <div style="padding-left: 30px; font-size: 20px">{{my_address.phone}}</div>
        <hr>
        <div class="order-title"><font>&nbsp&nbsp&nbsp&nbsp;Shopping List</font></div>
	<table id="cart_info" cellspacing="20" >
	    <thead>
		<tr align="center">
		    <th colspan="5">Product</th>
		    <th colspan="5">Price</th>
                    <th>Quantity</th>
		    <th class="right">Total</th>
		</tr>
	    </thead>
	    <tfoot>
		<tr>
		    <th id="cart-subtotal" colspan="12" align="right">
			Total price: {{ total_price }}&nbsp;€
		    </th>
                </tr>
                {% if status_shipped %}
                <tr align="right">
                    <th colspan="12">
                        <form method="post" action="/order/arrived/">
                            <input type="hidden" name="order_id" value="{{my_order_id}}"/>
                            <input type="submit" value="Confirm" />
                        </form>
                    </th>
                </tr>
		{% endif %}
	    </tfoot>
	    <tbody>
		{% if order_details %}
		    {% for my_order in order_details %}
			<tr align="center">
                            <td align="center">
                                <img src="/{{ my_order.idproduct.image }}" />
                            </td>
			    <td colspan="4">
				<a href="/products/{{ my_order.idproduct.id}}" class="cart" style="color: blue;">
				    {{ my_order.idproduct.name }}
				</a>
			    </td>
			    <td colspan="5" align="center"><font>{{ my_order.idproduct.price }}&nbsp;€</font></td>
			    <td>
				{{my_order.count}}
                            </td>
			    <td class="table-right" align="center">
                                <font>{{ my_order.total }}&nbsp;€</font>
                            </td>
			</tr>
		    {% endfor %}
		{% endif %}
	    </tbody>
	</table>
    </div>
{% endblock %}